<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>第一种头部</title>
    <link rel="stylesheet" type="text/css" href="../../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
    <style>
        html,
        body {
            width: 100%;
            min-height: 100%;
            background: #f7f7f7;
            line-height: 1;
        }
        /*修改icon*/

        .left_icon {
            font-size: 1rem!important;
            color: #000!important;
        }
        /*修改头部标题*/

        .header_title {
            font-size: 0.9rem;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        /*.header_title .target_img{
          margin-right: 0.3rem;
        }*/
        /*固定头部*/

        .header {
            background-color: #fff;
            border: none!important;
            z-index: 8!important;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav header" id='header' style="padding-top:25px;">
        <a class="aui-pull-left aui-btn" onclick="close_win()">
            <span class="aui-iconfont aui-icon-left left_icon"></span>
        </a>
        <div class="aui-title header_title">
            <!-- <img src="../../../image/four/test.jpg" alt="" class="target_img"> -->
            <div class="target_img"></div>
            <span>第五种头部</span>
        </div>
    </header>

</body>
<script type="text/javascript" src="../../../script/api.js"></script>
<script type="text/javascript" src="../../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../../script/vue.min.js"></script>
<script type="text/javascript" src="../../../script/utils.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/aui-tab.js"></script>
<script type="text/javascript" src="../../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../../script/aui-pull-refresh.js"></script>
<script type="text/javascript">
    apiready = function() {

        //获取header的高度
        var oHeader = $api.byId("header");
        var headerH = $api.offset(oHeader).h;

        if (api.pageParam.type == "朋友动态") {
          $('.header_title span').text(api.pageParam.title);
          $('.target_img').css({"background":"url("+api.pageParam.img_src+") center/cover no-repeat","width":"1.2rem","height":"1.2rem","margin-right":"0.3rem"});
            api.openFrame({
                name: 'friend_person_list',
                url: '../friend_person_list.html',
                rect: {
                    x: 0,
                    y: headerH,
                    w: 'auto',
                    h: 'auto'
                },
                pageParam: {
                    target_id:api.pageParam.friend_id
                },
                bounces: false,
                bgColor: 'rgba(0,0,0,0)',
                vScrollBarEnabled: true,
                hScrollBarEnabled: true
            });

        }
    };


    // 关闭当前窗口
    function close_win() {
        api.closeWin({});
    }
</script>

</html>
